# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-fs
_pkgname=fs
pkgver=2.4.11
pkgrel=1
pkgdesc='Filesystem abstraction layer.'
arch=('any')
license=('BSD')
url='https://pypi.org/project/fs/#files'
depends=('python2' 'python2-appdirs' 'python2-pytz' 'python2-setuptools'
         'python2-six')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8a4e25b47427d8467e697ac5eff645130f159f0479386c958ebcc87839e6b8d4b2d46c3bb078208eb067629078960fde551fa14842cf65ff29afb0238911b4f5')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

